<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PolkitAuthorizationResult</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="polkit Reference Manual">
<link rel="up" href="ref-api.html" title="Part III. Client API Reference">
<link rel="prev" href="PolkitAuthority.html" title="PolkitAuthority">
<link rel="next" href="PolkitDetails.html" title="PolkitDetails">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="PolkitAuthority.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ref-api.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">polkit Reference Manual</th>
<td><a accesskey="n" href="PolkitDetails.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#PolkitAuthorizationResult.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#PolkitAuthorizationResult.description" class="shortcut">Description</a>
                   | 
                  <a href="#PolkitAuthorizationResult.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
<a name="PolkitAuthorizationResult"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="PolkitAuthorizationResult.top_of_page"></a>PolkitAuthorizationResult</span></h2>
<p>PolkitAuthorizationResult — Result for checking an authorization</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="PolkitAuthorizationResult.stability-level"></a><h2>Stability Level</h2>
Stable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="PolkitAuthorizationResult.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">                    <a class="link" href="PolkitAuthorizationResult.html#PolkitAuthorizationResult-struct" title="PolkitAuthorizationResult">PolkitAuthorizationResult</a>;
<a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="returnvalue">PolkitAuthorizationResult</span></a> * <a class="link" href="PolkitAuthorizationResult.html#polkit-authorization-result-new" title="polkit_authorization_result_new ()">polkit_authorization_result_new</a>
                                                        (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_authorized</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_challenge</code></em>,
                                                         <em class="parameter"><code><a class="link" href="PolkitDetails.html" title="PolkitDetails"><span class="type">PolkitDetails</span></a> *details</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="PolkitAuthorizationResult.html#polkit-authorization-result-get-is-authorized" title="polkit_authorization_result_get_is_authorized ()">polkit_authorization_result_get_is_authorized</a>
                                                        (<em class="parameter"><code><a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> *result</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="PolkitAuthorizationResult.html#polkit-authorization-result-get-is-challenge" title="polkit_authorization_result_get_is_challenge ()">polkit_authorization_result_get_is_challenge</a>
                                                        (<em class="parameter"><code><a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> *result</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="PolkitAuthorizationResult.html#polkit-authorization-result-get-retains-authorization" title="polkit_authorization_result_get_retains_authorization ()">polkit_authorization_result_get_retains_authorization</a>
                                                        (<em class="parameter"><code><a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> *result</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="PolkitAuthorizationResult.html#polkit-authorization-result-get-temporary-authorization-id" title="polkit_authorization_result_get_temporary_authorization_id ()">polkit_authorization_result_get_temporary_authorization_id</a>
                                                        (<em class="parameter"><code><a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> *result</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="PolkitAuthorizationResult.html#polkit-authorization-result-get-dismissed" title="polkit_authorization_result_get_dismissed ()">polkit_authorization_result_get_dismissed</a>
                                                        (<em class="parameter"><code><a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> *result</code></em>);
<a class="link" href="PolkitDetails.html" title="PolkitDetails"><span class="returnvalue">PolkitDetails</span></a> *     <a class="link" href="PolkitAuthorizationResult.html#polkit-authorization-result-get-details" title="polkit_authorization_result_get_details ()">polkit_authorization_result_get_details</a>
                                                        (<em class="parameter"><code><a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> *result</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="PolkitAuthorizationResult.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----PolkitAuthorizationResult
</pre>
</div>
<div class="refsect1">
<a name="PolkitAuthorizationResult.description"></a><h2>Description</h2>
<p>
This class represents the result you get when checking for an authorization.
</p>
</div>
<div class="refsect1">
<a name="PolkitAuthorizationResult.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="PolkitAuthorizationResult-struct"></a><h3>PolkitAuthorizationResult</h3>
<pre class="programlisting">typedef struct _PolkitAuthorizationResult PolkitAuthorizationResult;</pre>
<p>
The <a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> struct should not be accessed directly.
</p>
</div>
<hr>
<div class="refsect2">
<a name="polkit-authorization-result-new"></a><h3>polkit_authorization_result_new ()</h3>
<pre class="programlisting"><a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="returnvalue">PolkitAuthorizationResult</span></a> * polkit_authorization_result_new
                                                        (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_authorized</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_challenge</code></em>,
                                                         <em class="parameter"><code><a class="link" href="PolkitDetails.html" title="PolkitDetails"><span class="type">PolkitDetails</span></a> *details</code></em>);</pre>
<p>
Creates a new <a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>is_authorized</code></em> :</span></p></td>
<td>Whether the subject is authorized.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>is_challenge</code></em> :</span></p></td>
<td>Whether the subject is authorized if more
information is provided. Must be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> unless <em class="parameter"><code>is_authorized</code></em> is
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>details</code></em> :</span></p></td>
<td>Must be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> unless <em class="parameter"><code>is_authorized</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> object. Free with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="polkit-authorization-result-get-is-authorized"></a><h3>polkit_authorization_result_get_is_authorized ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            polkit_authorization_result_get_is_authorized
                                                        (<em class="parameter"><code><a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> *result</code></em>);</pre>
<p>
Gets whether the subject is authorized.
</p>
<p>
If the authorization is temporary, use <a class="link" href="PolkitAuthorizationResult.html#polkit-authorization-result-get-temporary-authorization-id" title="polkit_authorization_result_get_temporary_authorization_id ()"><code class="function">polkit_authorization_result_get_temporary_authorization_id()</code></a>
to get the opaque identifier for the temporary authorization.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>A <a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Whether the subject is authorized.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="polkit-authorization-result-get-is-challenge"></a><h3>polkit_authorization_result_get_is_challenge ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            polkit_authorization_result_get_is_challenge
                                                        (<em class="parameter"><code><a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> *result</code></em>);</pre>
<p>
Gets whether the subject is authorized if more information is provided.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>A <a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Whether the subject is authorized if more information is provided.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="polkit-authorization-result-get-retains-authorization"></a><h3>polkit_authorization_result_get_retains_authorization ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            polkit_authorization_result_get_retains_authorization
                                                        (<em class="parameter"><code><a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> *result</code></em>);</pre>
<p>
Gets whether authorization is retained if obtained via authentication. This can only be the case
if <em class="parameter"><code>result</code></em> indicates that the subject can obtain authorization after challenge (cf.
<a class="link" href="PolkitAuthorizationResult.html#polkit-authorization-result-get-is-challenge" title="polkit_authorization_result_get_is_challenge ()"><code class="function">polkit_authorization_result_get_is_challenge()</code></a>), e.g. when the subject is not already authorized (cf.
<a class="link" href="PolkitAuthorizationResult.html#polkit-authorization-result-get-is-authorized" title="polkit_authorization_result_get_is_authorized ()"><code class="function">polkit_authorization_result_get_is_authorized()</code></a>).
</p>
<p>
If the subject is already authorized, use <a class="link" href="PolkitAuthorizationResult.html#polkit-authorization-result-get-temporary-authorization-id" title="polkit_authorization_result_get_temporary_authorization_id ()"><code class="function">polkit_authorization_result_get_temporary_authorization_id()</code></a>
to check if the authorization is temporary.
</p>
<p>
This method simply reads the value of the key/value pair in <em class="parameter"><code>details</code></em> with the
key <code class="literal">polkit.retains_authorization_after_challenge</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>A <a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the authorization is or will be temporary.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="polkit-authorization-result-get-temporary-authorization-id"></a><h3>polkit_authorization_result_get_temporary_authorization_id ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       polkit_authorization_result_get_temporary_authorization_id
                                                        (<em class="parameter"><code><a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> *result</code></em>);</pre>
<p>
Gets the opaque temporary authorization id for <em class="parameter"><code>result</code></em> if <em class="parameter"><code>result</code></em> indicates the
subject is authorized and the authorization is temporary rather than one-shot or
permanent.
</p>
<p>
You can use this string together with the result from
<a class="link" href="PolkitAuthority.html#polkit-authority-enumerate-temporary-authorizations" title="polkit_authority_enumerate_temporary_authorizations ()"><code class="function">polkit_authority_enumerate_temporary_authorizations()</code></a> to get more details
about the temporary authorization or <a class="link" href="PolkitAuthority.html#polkit-authority-revoke-temporary-authorization-by-id" title="polkit_authority_revoke_temporary_authorization_by_id ()"><code class="function">polkit_authority_revoke_temporary_authorization_by_id()</code></a>
to revoke the temporary authorization.
</p>
<p>
If the subject is not authorized, use <a class="link" href="PolkitAuthorizationResult.html#polkit-authorization-result-get-retains-authorization" title="polkit_authorization_result_get_retains_authorization ()"><code class="function">polkit_authorization_result_get_retains_authorization()</code></a>
to check if the authorization will be retained if obtained via authentication.
</p>
<p>
This method simply reads the value of the key/value pair in <em class="parameter"><code>details</code></em> with the
key <code class="literal">polkit.temporary_authorization_id</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>A <a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The opaque temporary authorization id for
<em class="parameter"><code>result</code></em> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not available. Do not free this string, it
is owned by <em class="parameter"><code>result</code></em>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="polkit-authorization-result-get-dismissed"></a><h3>polkit_authorization_result_get_dismissed ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            polkit_authorization_result_get_dismissed
                                                        (<em class="parameter"><code><a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> *result</code></em>);</pre>
<p>
Gets whether the authentication request was dismissed / canceled by the user.
</p>
<p>
This method simply reads the value of the key/value pair in <em class="parameter"><code>details</code></em> with the
key <code class="literal">polkit.dismissed</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>A <a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the authentication request was dismissed, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.101</p>
</div>
<hr>
<div class="refsect2">
<a name="polkit-authorization-result-get-details"></a><h3>polkit_authorization_result_get_details ()</h3>
<pre class="programlisting"><a class="link" href="PolkitDetails.html" title="PolkitDetails"><span class="returnvalue">PolkitDetails</span></a> *     polkit_authorization_result_get_details
                                                        (<em class="parameter"><code><a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a> *result</code></em>);</pre>
<p>
Gets the details about the result.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>A <a class="link" href="PolkitAuthorizationResult.html" title="PolkitAuthorizationResult"><span class="type">PolkitAuthorizationResult</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="PolkitDetails.html" title="PolkitDetails"><span class="type">PolkitDetails</span></a> object or
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there are no details. This object is owned by <em class="parameter"><code>result</code></em> and
should not be freed by the caller. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>][<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>